<?php

require_once 'Zend/View/Helper/Abstract.php';

class Core_View_Helper_Admin_RenderLinks extends Zend_View_Helper_Abstract
{
    /**
     * comments
     */
    public function renderLinks($links, $class, $prependText = null, $appendText = null, $separator = ' | ')
    {
        if (is_array($links) && count($links) > 0) {
            foreach ($links as $label => $link) {
                $linkClass = strtolower($label);
                $linkClass = str_replace(' ', '_', $linkClass);
                $hyperlinks[] = '<a href="' . $link . '" class="' . $linkClass . '">' . $this->view->getTranslation($label) . '</a>';
            }
            return '<p class="' . $class . '">' . $prependText . implode($separator, $hyperlinks) . $appendText . '</p>';
        }
    }
}